import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations.js'
import actions from './actions.js'
Vue.use(Vuex);

const state = {
    token: sessionStorage.getItem('token'),
    userInfo: JSON.parse(sessionStorage.getItem('user')),
    loginStatus: sessionStorage.getItem('token')?true:false,
    updateUserData: false,
    updateSchemeData: false,
    updateServiceData: false,
    currentScheme: sessionStorage.getItem('currentScheme'),
    currentStreamUrl: '',
    isVideoFullScreen: false,
    collapseFlag:false
}

export default new Vuex.Store({
    state,
    mutations,
    actions
});